
	<!-- Page title -->
	<div id="pagetitle">
		<div class="wrapper">
			<h1>Accounting &rarr; <span>Edit Entry</span></h1>
			<!--form action="" method="get"><input class="" type="text" id="q" name="q" /></form-->
		</div>
	</div>
	<!-- End of Page title -->
	
	<!-- Page content -->
	<div id="page">
		<!-- Wrapper -->
		<div class="wrapper">
		
			<p>&nbsp;</p>			
					
            <div class="leading clearfix">		
            	<!-- Message -->
                <div id="message-box" class="box hidden"></div>	
			
				<!-- Accounting Entry Summary -->
				<div class="column width2 first">
					<div class="content-box corners">				
						<header>
							<h3><img src="<?= $this->config->item('webroot') ?>images/icons/information.png" alt="" />Summary</h3>
						</header>					
						<section>				
                        	<? foreach($acctg_entry as $entry_id => $data ) : ?>
                            			
							<!-- Select Options -->
							<div class="inner-width2 first">
								<label style="font-size:14px"><?= $data['acctg_account_name'] ?> <br /><?= $data['acctg_account_category_name'] ?></label><br />
								<small>Entry Date: <?= $data['transaction_date'] ?></small><br />
								<hr />
								<table>
									<tbody>
										<tr>
                                        	<? if(!empty($data['company_name'])): ?>
											<td colspan="3"><label style="font-size:12px"><?= $data['company_name'] ?></label><br />
											<small><?= $data['description'] ?></small><br /></td>
                                            <? else: ?>
                                            <td colspan="3"><label style="font-size:12px"><?= $data['description'] ?></label><br />
                                            <? endif; ?>
										</tr>
										<tr><td>&nbsp;</td></tr>
										<tr>
											<td>Total Money In</td>
											<td>&nbsp;:&nbsp;</td>
											<td><label style="font-size:14px">PhP <?= $data['total_money_in'] ?></label></td>
										</tr>
										<tr>
											<td>Total Money Out</td>
											<td>&nbsp;:&nbsp;</td>
											<td><label style="font-size:14px">PhP <?= $data['total_money_out'] ?></label></td>
										</tr>
										<tr>
											<td>Total Other</td>
											<td>&nbsp;:&nbsp;</td>
											<td><label style="font-size:14px">PhP <?= $data['total_other'] ?></label></td>
										</tr>
									</tbody>
								</table>
								<hr />
							</div>
							<!-- End of Select Options -->
						</section>				
					</div>
				</div>
				<!-- End of Accounting Entry Summary -->
			
				<!-- Accounting Entry Form -->
				<div class="column width6">
					<div class="content-box corners">                                           
                        <form id="form-edit-entry">  
						<header>
							<h3><img src="<?= $this->config->item('webroot') ?>images/icons/information.png" alt="" />Accounting Entry Form</h3>
							<span class="right-icons">
								<a href="#" title="Save">
									<img src="<?= $this->config->item('webroot') ?>images/icons/disk.png" />
								</a>
								<a href="#" title="Cancel">
									<img src="<?= $this->config->item('webroot') ?>images/icons/cancel.png" />
								</a>
							</span>
						</header>
						<section> 
                                                                               
                            <!-- Hidden data inputs -->
                            <input type="hidden" class="field-work-id" name="work_id" value="<?= $data['work_id']; ?>" />
                            <input type="hidden" class="field-acctg-entry-id" value="<?= $data['acctg_entry_id']; ?>" />
                            
							<!-- Existing PO Form -->
							<div id="existing-po-form" class="inner-width6 first">                            
                            	
                                <? if(!empty($data['work_id'])) : ?>
								<!-- Existing PO Form Header -->
								<div id="form-header">								
									<table class="full">
										<tbody>
											<tr>
												<td rowspan="2" style="width:60%">
													<label style="font-size:large"><?= $company_name; ?></label><br />
													<small>Company Name</small>
												</td>
												<td><label>PO #</label></td>
												<td><label>&nbsp;:&nbsp;</label></td>
												<td><label><?= $customer_po_num; ?></label></td>
												<td><spacer></spacer></td>
												<td><label>New PO #</label></td>
												<td><label>&nbsp;:&nbsp;</label></td>
												<td><label><?= $new_po_num; ?></label></td>
											</tr>
											<tr>
												<td><label>RFQ #</label></td>
												<td><label>&nbsp;:&nbsp;</label></td>
												<td><label><?= $customer_rfq_num; ?></label></td>
												<td><spacer></spacer></td>
												<td><label>New RFQ #</label></td>
												<td><label>&nbsp;:&nbsp;</label></td>
												<td><label><?= $new_rfq_num; ?></label></td>
											</tr>
										</tbody>
									</table>
                                    <div class="inner-width6 first"><hr /></div>
								</div>
								<!-- End of Existing PO Form Header -->
                                <? endif; ?>
								
								<!-- Description, Accounts, and Transaction -->
								<div class="inner-width6 first">
									<table class="no-style-no-border full">
										<tbody>
											<tr>
												<td style="width:15%"><label>Description</label></td>
												<td colspan="3"><input class="field-description full" type="text" value="<?= $data['description']; ?>" /></td>
											</tr>
											<tr>
												<td><label>Account</label></td>
                                                <td style="width:10%">
                                                	<select class="select-accounts" name="account_group">
                                                		<option value="-1">Select Account Group</option>
                                                		<? foreach($account_group as $acct_group_id => $value) : ?>
                                                    	<option value="<?= $acct_group_id; ?>"
                                                        <? if($data['acctg_account_category_id'] == $acct_group_id) { echo "selected='selected'"; } ?>
                                                        ><?= $value; ?></option>
                                                		<? endforeach; ?>
                                                	</select>
                                                </td>
												<td>                                                
                                                	<? foreach($acctg_accounts as $acct_group_id => $accounts) : ?>
                                                    	<div id="<?= $acct_group_id; ?>" class="accounts 
														<? if($data['acctg_account_category_id'] != $acct_group_id) { echo "hidden"; }?>">
                                                        	<select class="<?= $acct_group_id; ?>" name="<?= 'acctg_account_'. $acct_group_id; ?>">
                                                        		<option value='-1'>Select Specific Account</option>
                                                                <? foreach($accounts as $account_id => $value) : ?>
                                                        		<option value="<?= $account_id; ?>"
                                                                <? if($data['acctg_account_id'] == $account_id) { echo "selected='selected'"; } ?>
                                                                ><?= $value; ?></option>
                                                        		<? endforeach; ?>
                                                        	</select>
                                                        </div>
                                                    <? endforeach; ?>
												</td>
											</tr>
											<tr>
												<td><label>Transaction</label></td>
												<td colspan="2">
													<a id="button-add-money-in">+ Money In</a>&nbsp;&nbsp;&nbsp;
													<a id="button-add-money-out">+ Money Out</a>&nbsp;&nbsp;&nbsp;
													<a id="button-add-other">+ Other</a>
												</td>
											</tr>
										</tbody>
									</table>
								</div>
								<!-- End of Description, Accounts, and Transaction -->
                                <!-- Transactions -->
								<div class="transactions">
                                
                                <? 
																
									foreach($data['transactions'] as $transaction_id => $transaction_data) : 
									
										$transaction_id_str = "";
										$transaction_title = "";
										
										//hide show delete show strings
										$hide_show_title_class = "hide-show-title";
										$hide_show_title_id = "hide-show-title_";
										$hide_show_class = "hide-show-";
										$hide_show_id = "hide-show-";
										$delete_class = "delete-";
										$delete_id = "delete-";
										
										//transaction details
									
										if($transaction_data['transaction_type'] == 'money in') {
											$transaction_id_str = "MONEY_IN_" . $transaction_id;
											$transaction_title = "Money In (Receivable)";
											
											$hide_show_title_id .= $transaction_id_str;
											$hide_show_class .= "money-in-out";
											$hide_show_id .= "money-in-out_" . $transaction_id_str;
											$delete_class .= "money-in-out";
											$delete_id .= "money-in-out_" . $transaction_id_str;
										}
										else if($transaction_data['transaction_type'] == 'money out') {
											$transaction_id_str = "MONEY_OUT_" . $transaction_id;
											$transaction_title = "Money Out (Payable)";
											
											$hide_show_title_id .= $transaction_id_str;
											$hide_show_class .= "money-in-out";
											$hide_show_id .= "money-in-out_" . $transaction_id_str;
											$delete_class .= "money-in-out";
											$delete_id .= "money-in-out_" . $transaction_id_str;
										}
										else if($transaction_data['transaction_type'] == 'other') {
											$transaction_id_str = "OTHER_" . $transaction_id;
											$transaction_title = "Other";
											
											$hide_show_title_id .= $transaction_id_str;
											$hide_show_class .= "other";
											$hide_show_id .= "other_" . $transaction_id_str;
											$delete_class .= "other";
											$delete_id .= "other_" . $transaction_id_str;											
										}										
										
										if($transaction_data['transaction_type'] == 'money in' ||
										   $transaction_data['transaction_type'] == 'money out') :
								?>
                                	 	<div id="<?= $transaction_id_str; ?>" class="transaction">
                                        <div class="content-box corners inner-width6">
                                            <section>
                                                <!-- Title -->
                                                <div class="column inner-width5 first">
                                                	<label style="font-size:14px"><?= $transaction_title; ?></label>
                                                    <span id="<?= 'label-transaction-identifier_'. $transaction_id_str; ?>" class="label-transaction-identifier"></span>
												</div>
                                                <div class="column inner-width1 ta-right">
                                                    <span class="right-icons">
                                                        <a  id="<?= $delete_id; ?>" class="<?= $delete_class; ?>" title="Delete">
                                                            <img src="<?= $this->config->item('webroot') ?>images/icons/delete.png" />
                                                        </a>
                                                        <a id="<?= $hide_show_id; ?>" class="<?= $hide_show_class; ?>" title="Hide">
                                                            <img id="<?= 'image-hide-show_'. $transaction_id_str ?>" class="image-hide-show" src="<?= $this->config->item('webroot') ?>images/icons/bullet_arrow_up.png" />
                                                        </a>
                                                    </span>
                                                </div>                                                
                                                <!-- End of Title -->
                                                <div id="<?= 'transaction-details_'. $transaction_id_str; ?>" class="transaction-details">
                                                <!-- Transaction Date and Amount -->
                                                <div class="column inner-width3 first">
                                                    <!-- Transaction Date -->
                                                    <label>Transaction Date</label>
                                                    <div class="ta-center">                                                    	
                                                        <div id="<?= 'transaction-date-box_'. $transaction_id_str; ?>" class="transaction-date-box hasDatepick" style="margin:15px 0px 0px 87px;"></div>
                                                        <input id="<?= 'field-transaction-date_'. $transaction_id_str; ?>" type="text" class="field-transaction-date hasDatepick ta-center" value="<?= $transaction_data['transaction_date']; ?>" readonly="readonly" />
                                                    </div>
                                                    <!-- End of Transaction Date -->
                                                    <!-- Amount -->
                                                    <div class="amount-box" >
                                                    <table class="no-style-no-border full" style="margin:15px 5px 0px 5px">
                                                        <tbody>
                                                            <tr>
                                                                <td><label>Amount</label></td>
                                                            </tr>
                                                            <tr>
                                                                <td><label class="choice">Amount (Before VAT)</label></td>
                                                                <td><input id="<?= 'field-amount-before-vat_'. $transaction_id_str; ?>" type="text" class="field-amount-before-vat ta-right" value="<?= $transaction_data['amount_before_vat']; ?>" /></td>
                                                            </tr>
                                                            <tr>
                                                                <td><label class="choice">VAT</label></td>
                                                                <td><input id="<?= 'field-vat_'. $transaction_id_str; ?>" type="text" class="field-vat ta-right" value="<?= $transaction_data['vat']; ?>" /></td>
                                                            </tr>
                                                            <tr>
                                                                <td><label class="choice">Withholding Tax</label></td>
                                                                <td><input id="<?= 'field-withholding-tax_'. $transaction_id_str; ?>" type="text" class="field-withholding-tax ta-right" value="<?= $transaction_data['withholding_tax']; ?>" /></td>
                                                            </tr>
                                                            <tr>
                                                                <td></td>
                                                                <td style="padding-right:40px;"><hr class="black"/></td>
                                                            </tr>
                                                            <tr>
                                                                <td><label class="choice">TOTAL</label></td>
                                                                <td><input id="<?= 'field-total-amount'. $transaction_id_str; ?>" type="text" class="field-total-amount ta-right" value="<?= $transaction_data['total_amount']; ?>" readonly="readonly" /></td>
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                    </div>
                                                     <!-- End of Amount -->	
                                                </div>       
                                                 <!-- End of Transaction Date and Amount -->                                        
                                                
                                                <div class="column inner-width3">
                                                    <!-- Payment Methods -->
                                                    <div class="payment-methods">
                                                    	<input type="hidden" class="field-payment-methods" value="<?= $payment_methods; ?>"  />
                                                    	<table class='no-style-no-border full'  style='margin:0px 5px 0px 5px'>
                                                        	<tbody><tr><td colspan='2'><label>Method of Payment</label></td></tr>
                                                        	
                                                        	<? foreach($payment_methods as $payment_method_id => $payment_method) : 
															   $payment_method_name_lower_case = strtolower($payment_method);
															?>
                                                            	<tr>
                                                                	<td><label class="choice">
                                                            		<input type="radio" id="<?= 'payment-method-'. $payment_method_name_lower_case .'_'. $transaction_id_str; ?>" class="<?= 'payment-method-'. $payment_method_name_lower_case; ?> paymentmethods" name="<?= 'payment_method_'. $transaction_id_str; ?>" value="<?= $payment_method_id; ?>" <? if($transaction_data['payment_method_id'] == $payment_method_id){ echo "checked='checked'"; } ?> /><?= $payment_method; ?></label>
                                                                    </td>
                                                                    <td>
                                                                    <?
																		if( !empty( $payment_method_details[$payment_method_id] )) :
																	?>
                                                                    	<div id="<?= 'payment-method-'. $payment_method_name_lower_case .'-details_'. $transaction_id_str; ?>" class="<?= 'payment-method-'. $payment_method_name_lower_case .'-details payment-hideables_'. $transaction_id_str; ?> <? if($transaction_data['payment_method_id'] != $payment_method_id){ echo "hidden"; } ?>">
                                                                        
                                                                        <? foreach($payment_method_details[$payment_method_id] as $payment_method_detail_id => $payment_method_detail) : ?>
                                                                        	<input id="<?= $payment_method_detail_id; ?>" class="payment-method-details <? 'field-method-detail-'. $payment_method_detail_id; ?>" type="text" value="<? if($transaction_data['payment_method_id'] == $payment_method_id){ echo $transaction_data[$payment_method_id][$payment_method_detail_id]; } else { echo $payment_method_detail; } ?>" /><br />
                                                                        <? endforeach; ?>
                                                                        </div>
                                                                        <? endif; ?>
                                                                    </td>
                                                                 </tr>
                                                        	<? endforeach; ?>
                                                        	</tbody>
                                                        </table>
                                                    </div>      
                                                    <!-- End of Payment Methods -->                                              
                                                    <!-- Receipt Used in Transaction -->
                                                    <div class="transaction-receipts">
                                                    	<table class='no-style-no-border full'  style='margin:15px 5px 0px 5px'>
                                                        	<tbody>
                                                            	<tr>
                                                                	<td colspan='2'><label>Receipt Used in Transaction</label></td></tr>
                                                                    
                                                                    <? foreach($acctg_receipts as $acctg_receipt_id => $acctg_receipt_name) : 
																	   $acctg_receipt_name_dashed = str_replace(" ", "-", strtolower($acctg_receipt_name));
																	?>
                                                                    	<tr>
                                                                        	<td><label class='choice'>
                                                            					<input id="<?= 'receipt-'. $acctg_receipt_name_dashed .'_'. $transaction_id_str; ?>" class="<?= 'receipt-'. $acctg_receipt_name_dashed; ?> receipts" type='radio' value="<?= $acctg_receipt_id; ?>" name="<?= 'acctg_receipt_'. $transaction_id_str; ?>" <? if($transaction_data['receipt_id'] == $acctg_receipt_id){ echo "checked='checked'"; } ?> /><?= $acctg_receipt_name; ?></label></td> 
                                                                                
                                                           					<td>
                                                                            	<? if( !empty($acctg_receipt_details[$acctg_receipt_id]) ) : ?>
                                                                            	<div id="<?= 'receipt-'. $acctg_receipt_name_dashed .'-details_'. $transaction_id_str; ?>" class="<?= 'receipt-'.  $acctg_receipt_name_dashed .'-details receipt-hideables_'. $transaction_id_str; ?> <? if($transaction_data['receipt_id'] != $acctg_receipt_id){ echo "hidden"; } ?>">
                                                              
                                                                                <? foreach($acctg_receipt_details[$acctg_receipt_id] as $acctg_receipt_detail_id => $acctg_receipt_detail) : 
																					foreach($acctg_receipt_detail as $acctg_receipt_detail_name => $acctg_receipt_detail_type) :
																						$acctg_receipt_detail_name_underscored = str_replace(" ", "-", strtolower($acctg_receipt_detail_name));
																						if($acctg_receipt_detail_type == 'text') :
																				?>
                                                                                			<input id="<?= $acctg_receipt_detail_id; ?>" type="text" class="acctg_receipt_details <?= 'field-receipt-detail-'. $acctg_receipt_detail_id; ?>" value="<? if($transaction_data['receipt_id'] == $acctg_receipt_id){ echo $transaction_data[$acctg_receipt_id][$acctg_receipt_detail_id]; } else { echo $acctg_receipt_detail_name; } ?>" /><br />
                                                                                <?      elseif($acctg_receipt_detail_type == 'checkbox') : ?>
                                                                                			<label class='choice'><input id="<?= $acctg_receipt_detail_id; ?>" type='checkbox' class="acctg_receipt_details <?= 'checkbox-receipt-detail-'. $acctg_receipt_detail_id; ?>" <? if($transaction_data['receipt_id'] == $acctg_receipt_id && $transaction_data[$acctg_receipt_id][$acctg_receipt_detail_id] == 'y'){ echo "checked='checked'"; } ?> /><?= $acctg_receipt_detail_name; ?></label><br />
                                                        
                                                        						<? 		endif;
																					endforeach; 
																				   endforeach;
																				?>                                                                                
                                                                                </div>
                                                                                <? endif; ?>
                                                            				</td>
                                                            			</tr>
                                                        		<? endforeach; ?>
                                                        	</tbody>
                                                    	</table>
                                                    </div> 
                                                                                                       
                                                    <!-- Attachments -->
                                                    <div>
                                                        <table class="no-style-no-border full"  style="margin:15px 5px 0px 5px">
                                                            <tbody>
                                                                <tr>
                                                                    <td>
                                                                        <label>Attachment</label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <div class="transaction-attachment-box">
                                                                    <td>
                                                                        <input class="file-attachement full" type="file" />	
                                                                    </td>
                                                                    <td>		
                                                                        <div class="attachment-buttons hidden">
                                                                            <a class="button-add-attachment" href="#"><span class="icon icon-add" title="Add">&nbsp;</span></a>
                                                                            <a class="button-remove-attachment" href="#"><span class="icon icon-cancel" title="Remove">&nbsp;</span></a>
                                                                        </div>
                                                                    </td>
                                                                    </div>
                                                                </tr>
                                                                <tr>                                                           
                                                                    <div class="transaction-attachments"></div>
                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>                                                    
                                                    <!-- End of Attachments -->
                                                </div>		                                                
                                                <!-- Identifier and Notes -->
                                                <div class="column inner-width6 first">
                                                    <table class="full">
                                                        <tbody>
                                                            <tr><td>&nbsp;</td></tr>
                                                            <tr>
                                                                <td>
                                                                    <label>Identifier</label>
                                                                </td>
                                                                <td colspan="2">
                                                                    <label>Notes</label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                   <div class="select-transaction-identifier">
                                                                   <select id="<?= 'select-identifier_'. $transaction_id_str; ?>" class='select-identifier full'>
																		<option value='-1'>Select Identifier</option>
                                                                        <? foreach($transaction_identifiers as $identifier_id => $identifier) : ?>
																		<option value="<?= $identifier_id; ?>"
                                                                        	<? if($transaction_data['acctg_transaction_identifier_id'] == $identifier_id) {
																					echo "selected='selected'";
																				}
																			?>
                                                                        ><?= $identifier; ?></option>
                        												<? endforeach; ?>
																	</select>
                                                                   </div>
                                                                </td>
                                                                <td colspan="2">
                                                                    <input type="text" id="<?= 'field-transaction-note_'. $transaction_id_str; ?>"class="field-transaction-note full" value="<?= $transaction_data['notes']; ?>" />
                                                                </td>														
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <!-- End of Identifier and Notes -->	
                                                </div>							
                                            </section>
                                        </div>
                                        </div>
                                        
                                <? elseif($transaction_data['transaction_type'] == 'other') : ?>
                                
                                		<div id="<?= $transaction_id_str; ?>" class="transaction">
                                        <div class="content-box corners inner-width6">
                                            <section>
                                                <!-- Title -->
                                                <div class="column inner-width6 first">
                                                    <label style="font-size:14px"><?= $transaction_title; ?></label>
                                                    <small><a id="<?= $hide_show_id; ?>" class="<?= $hide_show_class; ?>" href="#"><span id="<?= $hide_show_title_id; ?>" class="<?= $hide_show_title_class; ?>">Hide</span></a></small>
                                                    <small><a id="<?= $delete_id; ?>" class="<?= $delete_class; ?>" href="#">Delete</a></small>
                                                </div>
                                                <!-- End of Title -->
                                                <div id="<?= 'transaction-details_'. $transaction_id_str; ?>" class="transaction-details">
                                                <!-- Transaction Date and Amount -->
                                                <div class="column inner-width3 first">
                                                    <!-- Transaction Date -->
                                                    <label>Transaction Date</label>
                                                    <div class="ta-center">                                                    	
                                                        <div id="<?= 'transaction-date-box_'. $transaction_id_str; ?>"class="transaction-date-box hasDatepick" style="margin:15px 0px 0px 87px;"></div>
                                                        <input id="<?= 'field-transaction-date_'. $transaction_id_str; ?>" type="text" class="field-transaction-date hasDatepick" value="<?= $transaction_data['transaction_date']; ?>" />
                                                    </div>
                                                    <!-- End of Transaction Date -->
                                                    <!-- Amount -->
                                                    <div class="amount-box" ></div>
                                                     <!-- End of Amount -->	
                                                </div>       
                                                 <!-- End of Transaction Date and Amount -->                                        
                                                
                                                <div class="column inner-width3">
                                                    
                                                    <!-- Receipt Used in Transaction -->
                                                    <div class="transaction-receipts">
                                                    	<table class='no-style-no-border full'  style='margin:15px 5px 0px 5px'>
                                                        	<tbody>
                                                            	<tr>
                                                                	<td colspan='2'><label>Receipt Used in Transaction</label></td></tr>
                                                                    
                                                                    <? foreach($acctg_receipts as $acctg_receipt_id => $acctg_receipt_name) : 
																	   $acctg_receipt_name_dashed = str_replace(" ", "-", strtolower($acctg_receipt_name));
																	?>
                                                                    	<tr>
                                                                        	<td><label class='choice'>
                                                            					<input class="<?= 'receipt-'. $acctg_receipt_name_dashed; ?>" type='radio' value="<?= $acctg_receipt_id; ?>" /><?= $acctg_receipt_name; ?></label></td> 
                                                                                
                                                           					<td>
                                                                            	<div class="<?= 'receipt-'.  $acctg_receipt_name_dashed .'-details'; ?>">
                                                              
                                                                                <? foreach($acctg_receipt_details[$acctg_receipt_id] as $acctg_receipt_detail_id => $acctg_receipt_detail) : 
																					foreach($acctg_receipt_detail as $acctg_receipt_detail_name => $acctg_receipt_detail_type) :
																						$acctg_receipt_detail_name_underscored = str_replace(" ", "-", strtolower($acctg_receipt_detail_name));
																						if($acctg_receipt_detail_type == 'text') :
																				?>
                                                                                			<input type="text" class="<?= 'field-receipt-detail-'. $acctg_receipt_detail_id; ?>" value="<?= $acctg_receipt_detail_name; ?>" /><br />
                                                                                <?      elseif($acctg_receipt_detail_type == 'checkbox') : ?>
                                                                                			<label class='choice'><input type='checkbox' class="<?= 'checkbox-receipt-detail-'. $acctg_receipt_detail_id; ?>" /><?= $acctg_receipt_detail_name; ?></label><br />
                                                        
                                                        						<? 		endif;
																					endforeach; 
																				   endforeach;
																				?>
                                                                                
                                                                                </div>
                                                            				</td>
                                                            			</tr>
                                                        		<? endforeach; ?>
                                                        	</tbody>
                                                    	</table>
                                                    </div> 
                                                                                                       
                                                    <!-- Attachments -->
                                                    <div>
                                                        <table class="no-style-no-border full"  style="margin:15px 5px 0px 5px">
                                                            <tbody>
                                                                <tr>
                                                                    <td>
                                                                        <label>Attachment</label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <div class="transaction-attachment-box">
                                                                    <td>
                                                                        <input class="file-attachement full" type="file" />	
                                                                    </td>
                                                                    <td>		
                                                                        <div class="attachment-buttons hidden">
                                                                            <a class="button-add-attachment" href="#"><span class="icon icon-add" title="Add">&nbsp;</span></a>
                                                                            <a class="button-remove-attachment" href="#"><span class="icon icon-cancel" title="Remove">&nbsp;</span></a>
                                                                        </div>
                                                                    </td>
                                                                    </div>
                                                                </tr>
                                                                <tr>                                                           
                                                                    <div class="transaction-attachments"></div>
                                                                </tr>
                                                            </tbody>
                                                        </table>
                                                    </div>                                                    
                                                    <!-- End of Attachments -->
                                                </div>		                                                
                                                <!-- Identifier and Notes -->
                                                <div class="column inner-width6 first">
                                                    <table class="full">
                                                        <tbody>
                                                            <tr><td>&nbsp;</td></tr>
                                                            <tr>
                                                                <td>
                                                                    <label>Identifier</label>
                                                                </td>
                                                                <td colspan="2">
                                                                    <label>Notes</label>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                   <div class="select-transaction-identifier">
                                                                   <select class='select-identifier full'>
																		<option value='-1'>Select Identifier</option>
                                                                        <? foreach($transaction_identifiers as $identifier_id => $identifier) : ?>
																		<option value="<?= $identifier_id; ?>"
                                                                        	<? if($transaction_data['acctg_transaction_identifier_id'] == $identifier_id) {
																					echo "selected='selected'";
																				}
																			?>
                                                                        ><?= $identifier; ?></option>
                        												<? endforeach; ?>
																	</select>
                                                                   </div>
                                                                </td>
                                                                <td colspan="2">
                                                                    <input type="text" class="field-transaction-note full"  value="<?= $transaction_data['notes']; ?>" />
                                                                </td>														
                                                            </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                                <!-- End of Identifier and Notes -->	
                                                </div>							
                                            </section>
                                        </div>
                                        </div>
                                <? 
									endif;
									endforeach; 
								?>  
                                </div>
                                <!-- Transactions -->
                                <!--TODO: Add templates here -->
							</div>
							<!-- End of Existing PO Form -->
							<div class="inner-width6 first"><hr /></div>
							<div class="first">
								<a id="button-save-edit-entry" class="btn btn-blue">Save</a>
								<a id="button-cancel-edit-entry" class="btn btn-red">Cancel</a>
							</div>
                        <? endforeach; ?>                        
						</section>
                        </form>
					</div>
				</div>
				<!-- End of Accounting Entry Form -->
							           
            </div>
			<!-- End of clearfix -->						
		</div>
		<!-- End of Wrapper -->
	</div>
	<!-- End of Page content -->
	
	<script type="text/javascript" src="<?= $this->config->item('webroot') ?>scripts/application/accounting/accounting.js"></script>
